package com.jinsi.service.tang.iml;

import com.jinsi.mapper.tang.ExamineMapper;
import com.jinsi.pojo.Examine;
import com.jinsi.service.tang.ExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * 审核商品详情列表
 * @author 唐文博
 * @Date 2022-08-10
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ExamineServiceImpl implements ExamineService {
    @Autowired
    private ExamineMapper examineMapper;

    /**
     * 查看表,全查
     * @param commodityId
     * @return
     */
    @Override
    @Transactional(readOnly = true)
    public List<Examine> getExamineCx(Integer commodityId) {
        return examineMapper.getExamineCx(commodityId);
    }

    /**
     * 点击按钮添加查看审核日志 添加审核日志
     * @param examinePersonnel
     * @param examineResult
     * @param feedbackdetails
     * @param journalCommodity
     * @throws Exception
     */
    @Override
    public void addCkExamine(String examinePersonnel, String examineResult,
                             String feedbackdetails, int journalCommodity,
                                Date examineDate) throws Exception {
        examineMapper.addCkExamine(examinePersonnel,examineResult,feedbackdetails,journalCommodity,examineDate);
    }
}
